-- GENERATED SPELL FOR [Devouring Ghoul] --


function spell0_28249(pUnit, Event) --@Devour Flesh,n/a--
pUnit:FullCastSpellOnTarget(52352,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_28249', 15277, 1)
end

function spell1_28249(pUnit, Event) --@Devour Flesh,n/a--
pUnit:FullCastSpellOnTarget(58758,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_28249', 15260, 1)
end

function Sorts_28249(pUnit, Event)
local choix_sorts_28249 = math.random(0, 1)
if choix_sorts_28249 == 0 then
pUnit:RegisterEvent('spell0_28249', 1, 1)
end
if choix_sorts_28249 == 1 then
pUnit:RegisterEvent('spell1_28249', 1, 1)
end
end

function mob28249_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_28249', math.random(1500, 3000), 1)
end

function mob28249_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob28249_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob28249_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(28249, 1, 'mob28249_Action')
RegisterUnitEvent(28249, 2, 'mob28249_Leave')
RegisterUnitEvent(28249, 3, 'mob28249_Kill')
RegisterUnitEvent(28249, 4, 'mob28249_Die')
